package com.tianji.learning.controller;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.query.ReplyPageQuery;
import com.tianji.learning.domain.vo.ReplyVO;
import com.tianji.learning.service.IInteractionReplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// 互动问题的回答或评论 前端控制器
@RestController
@RequestMapping("/replies")
@Api(tags = "评论相关接口")
public class InteractionReplyController {

    @Autowired
    private IInteractionReplyService interactionReplyService;

    @GetMapping("/page")
    @ApiOperation("分页查询回答与评论列表")
    public PageDTO<ReplyVO> pageReplies(ReplyPageQuery replyPageQuery){
        return interactionReplyService.pageReplies(replyPageQuery);
    }

}